<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;

class Client extends Base
{
    use SoftDeletes;

    public function province()
    {
        return $this->hasOne(Province::class, 'code', 'province');
    }

    public function city()
    {
        return $this->hasOne(City::class, 'code', 'city');
    }

    public function area()
    {
        return $this->hasOne(Area::class, 'code', 'area');
    }

    public function agent()
    {
        return $this->belongsTo(Agent::class);
    }
}
